package com.atguigu.jxc.controller;

import com.atguigu.jxc.dao.GoodsTypeDao;
import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.service.GoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 商品分类
 * @author: 化一帆
 * @date: 2023/2/10 11:50
 * @version: v1.0
 */
@RestController
@RequestMapping("/goodsType")
public class GoodsTypeController {
    @Autowired
    private GoodsTypeService goodsTypeService;

    /**
     * @description: 商品分类树
     * @author 化一帆
     * @date 2023/2/10 14:56
     */
    @PostMapping("/loadGoodsType")
    public String list(){
       return  goodsTypeService.list();
    }

    /**
     * @description: 新增商品分类
     * http://localhost:8080/goodsType/save
     * @author 化一帆
     * @date 2023/2/10 14:57
     */
    /*@PostMapping("/save")
    public ServiceVO save(String  goodsTypeName,Integer  pId){
        return goodsTypeService.save(goodsTypeName,pId);
    }*/

}
